package com.june.junemplayer;

import android.content.Context;
import android.content.res.Configuration;
import android.os.Handler;

import com.june.junemplayer.base.ActivityManager;
import com.june.junemplayer.base.BaseApplication;

public class JuneMPlayerApplication extends BaseApplication {

    public static JuneMPlayerApplication mJuneMPlayerApplication;
    private static ActivityManager mActivityManager;
    private Handler mHandler;


    public static Context getMyContext() {
        return mJuneMPlayerApplication == null ? null : mJuneMPlayerApplication.getApplicationContext();
    }


    public Handler getMyHandler() {
        return mHandler;
    }

    public void setMyHandler(Handler handler) {
        mHandler = handler;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        mActivityManager = new ActivityManager();
        mJuneMPlayerApplication = this;
    }


    public static ActivityManager getActivityManager() {
        return mActivityManager;
    }


    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
    }

}